home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / bbsutils / dlprm100.arj / DLPROMPT.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-03-13  |  5KB  |  320 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Boolean  BOOLEAN001
  20.     Boolean  BOOLEAN002
  21.     Boolean  TBOOLEAN003(5)
  22.     Boolean  TBOOLEAN004(5)
  23.     Boolean  BOOLEAN005
  24.     DWord    DWORD001
  25.     DWord    DWORD002
  26.     Integer  INTEGER001
  27.     Integer  INTEGER002
  28.     Integer  INTEGER003
  29.     Integer  INTEGER004
  30.     Integer  INTEGER005
  31.     Integer  TINTEGER006(5)
  32.     Integer  TINTEGER007(5)
  33.     Integer  INTEGER008
  34.     String   STRING001
  35.     String   STRING002
  36.     String   STRING003
  37.     String   TSTRING004(5)
  38.     String   STRING005
  39.     String   STRING006
  40.     Byte     BYTE001
  41.     Byte     BYTE002
  42.     Int      INT001
  43.  
  44. ;------------------------------------------------------------------------------
  45.  
  46.     GetUser
  47.     BOOLEAN001 = 0
  48.     BOOLEAN002 = 0
  49.     STRING001 = GetToken()
  50.     While (Len(STRING001) <> 0) Do
  51.         If ((Mid(STRING001, 2, 2) == "SY") && (CurSec() >= ReadLine(PCBDat(), 8))) BOOLEAN002 = 1
  52.         If ((Mid(STRING001, 2, 2) == "EX") && U_Expert) BOOLEAN001 = 1
  53.         STRING001 = GetToken()
  54.     EndWhile
  55.     If ((!AnsiOn() || BOOLEAN001) || BOOLEAN002) Then
  56.         DispFile PPEPath() + "DLPROMPT", 4
  57.         End
  58.     Endif
  59.     If (Exist("DL" + String(PcbNode()) + ".$$$")) Then
  60.         Delete "DL" + String(PcbNode()) + ".$$$"
  61.         If ((GetX() == 1) && (GetY() == 22)) Then
  62.             Cls
  63.         Else
  64.             AnsiPos 1, GetY()
  65.             Wait
  66.             Cls
  67.         Endif
  68.     Else
  69.         Cls
  70.     Endif
  71.     STRING006 = Chr(27)
  72.     If (ReadLine(PCBDat(), 90) == "-1") Then
  73.         STRING002 = "FLIST." + String(PcbNode())
  74.     Else
  75.         STRING002 = "FLIST."
  76.     Endif
  77.     INTEGER005 = 129
  78.     INTEGER008 = 129 * FlagCnt()
  79.     If (Exist(STRING002)) Then
  80.         FOpen 1, STRING002, 2, 0
  81.         FOpen 2, STRING002, 2, 0
  82.     Endif
  83.     DispFile PPEPath() + "DLBOX", 1
  84.     If (GrafMode() == "R") Then
  85.         Gosub LABEL002
  86.     Else
  87.         Gosub LABEL001
  88.     Endif
  89.     FClose 1
  90.     FClose 2
  91.     End
  92.     :LABEL001
  93.     Print STRING006 + "[37;1;m"
  94.     Gosub LABEL006
  95.     AnsiPos 1, 12
  96.     For INTEGER003 = 1 To 5
  97.         Print STRING006 + "[4C"
  98.         Push INTEGER003
  99.         Gosub LABEL005
  100.     Next
  101.     Gosub LABEL004
  102.     AnsiPos 12, 20
  103.     OpText FlagCnt()
  104.     Print "@X0F", "@OPTEXT:4R@"
  105.     Print STRING006 + "[17C"
  106.     OpText DWORD002
  107.     Print "@X0F", "@OPTEXT:10@"
  108.     Push DWORD001
  109.     Gosub LABEL003
  110.     Print STRING006 + "[19C"
  111.     Print "@X0F", STRING003
  112.     AnsiPos 24, 3
  113.     InputStr "_", STRING005, 7, 55, Mask_File() + "*?", 8 + 16
  114.     AnsiPos 1, 22
  115.     KbdStuff STRING005 + Chr(13)
  116.     If (Len(LTrim(STRING005, " ")) <> 0) Then
  117.         FCreate 3, "DL" + String(PcbNode()) + ".$$$", 1, 3
  118.         FClose 3
  119.     Endif
  120.     Return
  121.     :LABEL002
  122.     Gosub LABEL006
  123.     AnsiPos 1, 15
  124.     For INTEGER003 = 1 To 5
  125.         Print STRING006 + "[4C"
  126.         Push INTEGER003
  127.         Gosub LABEL005
  128.     Next
  129.     Gosub LABEL004
  130.     AnsiPos 12, 24
  131.     OpText FlagCnt()
  132.     Print "@X0F", "@OPTEXT:4R@"
  133.     Print STRING006 + "[17C"
  134.     OpText DWORD002
  135.     Print "@X0F", "@OPTEXT:10@"
  136.     Push DWORD001
  137.     Gosub LABEL003
  138.     Print STRING006 + "[19C"
  139.     Print "@X0F", STRING003
  140.     AnsiPos 24, 3
  141.     InputStr "_", STRING005, 7, 55, Mask_File() + "*?", 8 + 16
  142.     KbdStuff STRING005 + Chr(13)
  143.     AnsiPos 1, 28
  144.     Return
  145.     :LABEL003
  146.     Pop INTEGER002
  147.     If (INTEGER002 >= 3600) Then
  148.         BYTE001 = ToInt(INTEGER002 / 3600)
  149.         STRING003 = Right(String(BYTE001), 2) + " hrs "
  150.         BYTE002 = ToInt((INTEGER002 - BYTE001 * 3600) / 60)
  151.         STRING003 = STRING003 + String(Right(BYTE002, 2)) + " min"
  152.     Else
  153.         BYTE002 = ToInt(INTEGER002 / 60)
  154.         STRING003 = Right(String(BYTE002), 2) + " min "
  155.         STRING003 = STRING003 + String(Right(INTEGER002 - BYTE002 * 60, 2)) + " sec"
  156.     Endif
  157.     Return
  158.     :LABEL004
  159.     FSeek 2, 79, 1
  160.     For INTEGER003 = 1 To FlagCnt()
  161.         FRead 2, INTEGER001, 4
  162.         FRead 2, INTEGER002, 4
  163.         FSeek 2, INTEGER005 - 8, 1
  164.         DWORD001 = DWORD001 + INTEGER002
  165.         DWORD002 = DWORD002 + INTEGER001
  166.     Next
  167.     Return
  168.     :LABEL005
  169.     Pop INTEGER004
  170.     If (BOOLEAN005) Then
  171.         OpText FlagCnt() - 5 + INTEGER004
  172.     Else
  173.         OpText INTEGER004
  174.     Endif
  175.     Print "@X0B@OPTEXT:4R@"
  176.     Forward 3
  177.     OpText TSTRING004(INTEGER004)
  178.     Print "@X0F@OPTEXT:15@"
  179.     OpText TINTEGER006(INTEGER004)
  180.     Print "@X0F@OPTEXT:10R@"
  181.     Forward 4
  182.     Push TINTEGER007(INTEGER004)
  183.     Gosub LABEL003
  184.     OpText STRING003
  185.     Print "@OPTEXT@"
  186.     Print "@POS:61@"
  187.     If (TBOOLEAN003(INTEGER004)) Then
  188.         Print "@X0A■"
  189.     Else
  190.         Print "@X08·"
  191.     Endif
  192.     Print "@POS:71@"
  193.     If (TBOOLEAN004(INTEGER004)) Then
  194.         Print "@X0A■"
  195.     Else
  196.         Print "@X08·"
  197.     Endif
  198.     PrintLn 
  199.     Return
  200.     :LABEL006
  201.     If (FlagCnt() <= 5) Then
  202.         BOOLEAN005 = 0
  203.         Gosub LABEL007
  204.     Else
  205.         FSeek 1, -5 * INTEGER005, 2
  206.         BOOLEAN005 = 1
  207.         Gosub LABEL007
  208.     Endif
  209.     Return
  210.     :LABEL007
  211.     If (BOOLEAN005) Then
  212.         INT001 = 5
  213.     Else
  214.         INT001 = FlagCnt()
  215.     Endif
  216.     For INTEGER003 = 1 To INT001
  217.         FSeek 1, 66, 1
  218.         FRead 1, TSTRING004(INTEGER003), 13
  219.         FRead 1, TINTEGER006(INTEGER003), 4
  220.         FRead 1, TINTEGER007(INTEGER003), 4
  221.         FSeek 1, 8, 1
  222.         FRead 1, TBOOLEAN003(INTEGER003), 1
  223.         FRead 1, TBOOLEAN004(INTEGER003), 1
  224.         FSeek 1, INTEGER005 - 97, 1
  225.     Next
  226.     Return
  227.  
  228. ;------------------------------------------------------------------------------
  229. ;
  230. ; Usage report (before postprocessing)
  231. ;
  232. ; ■ Statements used :
  233. ;
  234. ;    2       End
  235. ;    3       Cls
  236. ;    1       Wait
  237. ;    33      Goto 
  238. ;    32      Let 
  239. ;    23      Print 
  240. ;    1       PrintLn 
  241. ;    20      If 
  242. ;    2       DispFile 
  243. ;    1       FCreate 
  244. ;    2       FOpen 
  245. ;    3       FClose 
  246. ;    1       GetUser
  247. ;    1       Delete 
  248. ;    2       InputStr 
  249. ;    13      Gosub 
  250. ;    7       Return
  251. ;    5       Push 
  252. ;    2       Pop 
  253. ;    2       KbdStuff 
  254. ;    9       OpText 
  255. ;    9       AnsiPos 
  256. ;    2       Forward 
  257. ;    6       FSeek 
  258. ;    7       FRead 
  259. ;
  260. ;
  261. ; ■ Functions used :
  262. ;
  263. ;    1       -
  264. ;    4       *
  265. ;    3       /
  266. ;    35      +
  267. ;    5       -
  268. ;    6       ==
  269. ;    2       <>
  270. ;    4       <
  271. ;    5       <=
  272. ;    10      >=
  273. ;    19      !
  274. ;    11      &&
  275. ;    6       ||
  276. ;    2       Len(
  277. ;    2       Mid()
  278. ;    4       Right()
  279. ;    3       Chr()
  280. ;    1       LTrim()
  281. ;    8       String()
  282. ;    2       Mask_File()
  283. ;    2       PCBDat()
  284. ;    2       PPEPath()
  285. ;    4       PcbNode()
  286. ;    2       ReadLine()
  287. ;    1       CurSec()
  288. ;    2       GetToken()
  289. ;    2       Exist()
  290. ;    1       AnsiOn()
  291. ;    1       GetX()
  292. ;    2       GetY()
  293. ;    1       GrafMode()
  294. ;    3       ToInt()
  295. ;    8       FlagCnt()
  296. ;
  297. ;------------------------------------------------------------------------------
  298. ;
  299. ; Analysis flags : d
  300. ;
  301. ; d - Access PCBOARD.DAT ■ 2
  302. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  303. ;     for many PPE so they can find various informations on the system
  304. ;     (system paths, max number of lines in messages, ...) but it may also
  305. ;     be a way to gather vital informations.
  306. ;     ■ Search for : PCBDAT()
  307. ;
  308. ;------------------------------------------------------------------------------
  309. ;
  310. ; Postprocessing report
  311. ;
  312. ;    4       For/Next
  313. ;    1       While/EndWhile
  314. ;    13      If/Then or If/Then/Else
  315. ;    0       Select Case
  316. ;
  317. ;------------------------------------------------------------------------------
  318. ;                 AEGiS Corp - Break the routines, code against the machines!
  319. ;------------------------------------------------------------------------------
  320.